home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
SHELLS
/
TPSHELL
/
SHELL.DOC
next >
Wrap
Text File
|
1986-05-23
|
1KB
|
27 lines
SHELL.PAS
This is an include file for Turbo Pascal which defines the
procedure Shell, allowing a Pascal program to call a DOS subprocess
to execute any command string as if it had been typed from the command
prompt. It is a simplification of the procedures developed byBela Lubkin
of Borland International Technical Support, saving a little space and compile
time and hopefully a little easier to understand and include in programs.
Tutorial comments are included with the source code.
SUBPROC.PAS
This is the source code for a simple program which uses SHELL to execute
DOS commands. It can be used inside a .BAT file to execute other .BAT
files and then resume. The levels of nesting is limited by memory size and
the number of open files your system allows.
It also illustrates an easy techique to get all of the parameter string
from DOS, without bothering with concatenating from ParamStr function.
It seems odd that Borland didn't build this into the language (unless they
did and I missed it.)
AUTHOR: Bill Mayne
9707 Lawndale Dr.
Silver Spring, MD 20901